//
//  SegmentPageView.h
//  Towerxi3
//
//  Created by MAC on 2021/5/10.
//

#import "TXScrollView.h"

NS_ASSUME_NONNULL_BEGIN

@protocol SegmentPageViewDelegate <NSObject>

/// 当前显示Index
- (void)didSelectIndex:(NSInteger)index;

@end

@interface SegmentPageView : UIView<UIScrollViewDelegate>

@property (nonatomic, strong) TXScrollView *topScrollView;
@property (nonatomic, strong) TXScrollView *bottomScrollView;
@property (nonatomic, strong) NSArray<UIViewController *> *viewControllers;
@property (nonatomic, strong) NSMutableArray *viewList;
@property (nonatomic, strong) UIFont *normalTextFont; /// 默认字体大小
@property (nonatomic, strong) UIFont *selectTextFont; /// 选中后字体大小
@property (nonatomic, strong) UIColor *normalTextColor; /// 默认文字颜色
@property (nonatomic, strong) UIColor *selectTextColor; /// 选中后文字颜色
@property (nonatomic, strong) UIColor *normalBackColor; /// 默认背景色
@property (nonatomic, strong) UIColor *selectBackColor; /// 选中后背景颜色
@property (nonatomic, strong) NSArray *normalImages; /// 默认图片
@property (nonatomic, strong) NSArray *selectImages; /// 选中后图片
@property (nonatomic, assign) CGFloat topRadius; /// 顶部圆角
@property (nonatomic, assign) CGFloat topWidth; /// 顶部宽度
@property (nonatomic, assign) CGFloat topHeight; /// 顶部高度
@property (nonatomic, strong) UIColor *topBackColor; /// 顶部背景色
@property (nonatomic, assign) CGFloat spacing; /// 间距
@property (nonatomic, assign) NSInteger radius; /// 圆角大小
@property (nonatomic, assign) BOOL equalWidth; /// 是否等宽
@property (nonatomic, assign) NSInteger selectIndex; /// 当前选择的位置
@property (nonatomic, assign) SegmentType segmentType; /// 文字，图片类型
@property (nonatomic, assign) SegmentTopAlignment topAlignment;
@property (nonatomic, weak) id<SegmentPageViewDelegate> delegate;

- (void)viewControllerRemind;

@end

@interface ViewsModel : NSObject

@property (nonatomic, strong) UIView *backView;
@property (nonatomic, strong) UIView *lineView;
@property (nonatomic, strong) UILabel *titleLabel;
@property (nonatomic, strong) UIImageView *iconView;
@property (nonatomic, strong) UIImageView *imageView;
@property (nonatomic, assign) SegmentType segmentType; /// 类型

@end

NS_ASSUME_NONNULL_END
